


void recursion(int *left, int *right)
{
	if (left >= right)
	{
		return;
	}
	int *pl = left;
	int *pr = right;
	int key = *pl;


	while(pl < pr)
	{
		while (pl < pr && key <= *pr)
		{
			pr--;
		}
		*pl = *pr;

		while (pl < pr && key >= *pl)
		{
			pl++;
		}
		*pr = *pl;
	}
	*pl = key;
	recursion(left, pl-1);
	recursion(pl+1, right);



}

int quick_sort(int *data, int lenth)
{
	if (data == 0 || lenth <= 0)
	{
		return -1;
	}


	int *left = data;
	int *right = data+lenth-1;

	recursion(left, right);



	return 0;
}
